/*
 *  window.cpp
 *  practice
 *
 *  Created by jin on 1/1/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include "window.h"
#include "factory.h"
#include "graphic2D.h"
#include "windowImpBase.h"
#include "mouseEvent.h"

Window::Window()
{
    pImp = FACTORY.CreateWindowImp(this);
}

Window::~Window()
{
    delete pImp;
}

void* Window::GetHandle()
{
    return pImp->GetHandle();
}

void Window::Show(bool show /* = true */)
{
    pImp->Show(show);
}

void Window::OnResize(unsigned int width, unsigned int height)
{
}

void Window::OnPaint(Graphic2D& gc)
{
}

void Window::OnMouseDown(MouseEvent& evt)
{
}

void Window::OnMouseMove(MouseEvent& evt)
{
}

void Window::OnMouseUp(MouseEvent& evt)
{
}

// TODO : add OnMouseDragged